<!-- 认证 -->
<script id="tpl-detail" type="text/template">
    <div class="am-padding-xs am-padding-top-sm">
        {{ if(model.apply_mode.value != 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">营业执照 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <a href="{{ model.details.license_copy.url }}" target="_blank">
                        <img src="{{ model.details.license_copy.url }}" />
                    </a>
                </div>
            </div>
        </div>
		<div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">执照类型 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INDIVIDUAL" data-am-ucheck 
                    {{ model.details.subject_type == 'SUBJECT_TYPE_INDIVIDUAL' ? 'checked' : '' }}> 个体
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INSTITUTIONS" data-am-ucheck 
                    {{ model.details.subject_type == 'SUBJECT_TYPE_INSTITUTIONS' ? 'checked' : '' }}> 公司
                </label>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">执照名称 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.merchant_name }}" name="data[details][merchant_name]" required>
                <small>营业执照上的公司名称或经营门店名称</small>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">统一社会信用代码 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.license_number }}" name="data[details][license_number]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <a href="{{ model.details.id_card_copy.url }}" target="_blank">
                        <img src="{{ model.details.id_card_copy.url }}" />
                    </a>
                </div>
                <div class="apply-img">
                    <a href="{{ model.details.id_card_national.url }}" target="_blank">
                        <img src="{{ model.details.id_card_national.url }}" />
                    </a>
                </div>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">姓名 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.id_card_name }}" name="data[details][id_card_name]" required>
            </div>
        </div>
        {{ if(model.apply_mode.value != 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.id_card_number }}" name="data[details][id_card_number]" required>
            </div>
        </div>
        {{ /if }}
        {{ if(model.apply_mode.value == 30) }}
        {{ if(model.details.qualifications.url != '') }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">特殊资质 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <a href="{{ model.details.qualifications.url }}" target="_blank">
                        <img src="{{ model.details.qualifications.url }}" />
                    </a>
                </div>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">开户银行 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.bank_name }}" name="data[details][bank_name]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">银行账号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="number" class="tpl-form-input" value="{{ model.details.account_number }}" name="data[details][account_number]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label">商户号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="number" class="tpl-form-input" value="{{ model.details.mch_id }}" name="data[details][mch_id]">
                <small>审核通过时此项必填</small>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">商户简称 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.merchant_shortname }}" name="data[merchant_shortname]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">小程序APP_ID </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.app_id }}" name="data[app_id]" required>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系电话 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="number" class="tpl-form-input" value="{{ model.details.mobile_phone }}" name="data[details][mobile_phone]" required>
            </div>
        </div>
        {{ if(model.apply_mode.value == 10 || model.apply_mode.value == 20)  }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">微信号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.legal_persona_wechat }}" name="data[details][legal_persona_wechat]" required>
            </div>
        </div>
        {{ /if }}
        {{ if(model.apply_mode.value == 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">代理级别 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="10" data-am-ucheck 
                    {{ model.agent_mode.value == 10 ? 'checked' : '' }}> 县区
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="20" data-am-ucheck 
                    {{ model.agent_mode.value == 20 ? 'checked' : '' }}> 市级
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="30" data-am-ucheck 
                    {{ model.agent_mode.value == 30 ? 'checked' : '' }}> 省级
                </label>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">代理区域 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.province }}{{ model.city }}{{ model.district }}" disabled>
            </div>
        </div>
        {{ /if }}
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">执行操作</div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label">驳回原因 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.reject }}" name="data[reject]" {{ model.apply_status.value !=10 ? 'disabled' : '' }}>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">操作类型 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="10" 
                    {{ model.apply_status.value == 10 ? 'checked' : '' }} 
                    {{ model.apply_status.value == 10 ? 'data-am-ucheck' : 'disabled' }}> 保存
                </label>
                {{ if(model.apply_mode.value == 10 || model.apply_mode.value == 20) }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="20" 
                    {{ model.apply_status.value == 20 ? 'checked' : '' }} 
                    {{ model.apply_status.value == 10 ? 'data-am-ucheck' : 'disabled' }}> 提交审核
                </label>
                <label class="am-radio-inline">
                    <input type="radio" {{ model.apply_status.value == 30 ? 'checked' : '' }} disabled> 审核成功
                </label>
                {{ else/ }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="30" 
                    {{ model.apply_status.value == 30 ? 'checked' : '' }} 
                    {{ model.apply_status.value == 10 ? 'data-am-ucheck' : 'disabled' }}> 审核成功
                </label>
                {{ /if }}
				<label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="40" 
                    {{ model.apply_status.value == 40 ? 'checked' : '' }} 
                    {{ model.apply_status.value == 10 ? 'data-am-ucheck' : 'disabled' }}> 资料驳回
                </label>
            </div>
        </div>
    </div>   
</script>

